icon theme: Make final
authorMatthias Clasen <mclasen@redhat.com>
Sun, 26 May 2019 19:33:10 +0000 (15:33 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 26 May 2019 19:33:10 +0000 (15:33 -0400)
Nobody should subclass GtkIconTheme or GtkIconInfo.

gtk/gtkicontheme.c
gtk/gtkicontheme.h

index d41d31310e15be04b9ab51ed5c3288d05e60fcdf..d9fc68054b2831907ae78cb42ab5045e5b02b4eb 100644 (file)
@@ -130,6 +130,29 @@ typedef enum
 #define DEBUG_CACHE(args)
 #endif
 
+typedef struct _GtkIconInfoClass    GtkIconInfoClass;
+typedef struct _GtkIconThemeClass   GtkIconThemeClass;
+typedef struct _GtkIconThemePrivate GtkIconThemePrivate;
+
+/**
+ * GtkIconTheme:
+ *
+ * Acts as a database of information about an icon theme.
+ * Normally, you retrieve the icon theme for a particular
+ * display using gtk_icon_theme_get_for_display() and it
+ * will contain information about current icon theme for
+ * that display, but you can also create a new #GtkIconTheme
+ * object and set the icon theme name explicitly using
+ * gtk_icon_theme_set_custom_theme().
+ */
+struct _GtkIconTheme
+{
+  /*< private >*/
+  GObject parent_instance;
+
+  GtkIconThemePrivate *priv;
+};
+
 struct _GtkIconThemePrivate
 {
   GHashTable *info_cache;
@@ -162,6 +185,13 @@ struct _GtkIconThemePrivate
   gulong theme_changed_idle;
 };
 
+struct _GtkIconThemeClass
+{
+  GObjectClass parent_class;
+
+  void (* changed)  (GtkIconTheme *icon_theme);
+};
+
 typedef struct {
   gchar **icon_names;
   gint size;
@@ -186,6 +216,12 @@ struct _GtkIconInfoClass
   GObjectClass parent_class;
 };
 
+/**
+ * GtkIconInfo:
+ *
+ * Contains information found when looking up an icon in
+ * an icon theme.
+ */
 struct _GtkIconInfo
 {
   GObject parent_instance;
index 057d2fe6f32ca0d1abb8c23a825f552256792271..de0cd2308de5cb97d70f913022d661d2473160ec 100644 (file)
@@ -31,72 +31,14 @@ G_BEGIN_DECLS
 
 #define GTK_TYPE_ICON_INFO              (gtk_icon_info_get_type ())
 #define GTK_ICON_INFO(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ICON_INFO, GtkIconInfo))
-#define GTK_ICON_INFO_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ICON_INFO, GtkIconInfoClass))
 #define GTK_IS_ICON_INFO(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ICON_INFO))
-#define GTK_IS_ICON_INFO_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ICON_INFO))
-#define GTK_ICON_INFO_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ICON_INFO, GtkIconInfoClass))
 
 #define GTK_TYPE_ICON_THEME             (gtk_icon_theme_get_type ())
 #define GTK_ICON_THEME(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ICON_THEME, GtkIconTheme))
-#define GTK_ICON_THEME_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ICON_THEME, GtkIconThemeClass))
 #define GTK_IS_ICON_THEME(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ICON_THEME))
-#define GTK_IS_ICON_THEME_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ICON_THEME))
-#define GTK_ICON_THEME_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ICON_THEME, GtkIconThemeClass))
 
-/**
- * GtkIconInfo:
- *
- * Contains information found when looking up an icon in
- * an icon theme.
- */
 typedef struct _GtkIconInfo         GtkIconInfo;
-typedef struct _GtkIconInfoClass    GtkIconInfoClass;
 typedef struct _GtkIconTheme        GtkIconTheme;
-typedef struct _GtkIconThemeClass   GtkIconThemeClass;
-typedef struct _GtkIconThemePrivate GtkIconThemePrivate;
-
-/**
- * GtkIconTheme:
- *
- * Acts as a database of information about an icon theme.
- * Normally, you retrieve the icon theme for a particular
- * display using gtk_icon_theme_get_for_display() and it
- * will contain information about current icon theme for
- * that display, but you can also create a new #GtkIconTheme
- * object and set the icon theme name explicitly using
- * gtk_icon_theme_set_custom_theme().
- */
-struct _GtkIconTheme
-{
-  /*< private >*/
-  GObject parent_instance;
-
-  GtkIconThemePrivate *priv;
-};
-
-/**
- * GtkIconThemeClass:
- * @parent_class: The parent class.
- * @changed: Signal emitted when the current icon theme is switched or
- *    GTK+ detects that a change has occurred in the contents of the
- *    current icon theme.
- */
-struct _GtkIconThemeClass
-{
-  GObjectClass parent_class;
-
-  /*< public >*/
-
-  void (* changed)  (GtkIconTheme *icon_theme);
-
-  /*< private >*/
-
-  /* Padding for future expansion */
-  void (*_gtk_reserved1) (void);
-  void (*_gtk_reserved2) (void);
-  void (*_gtk_reserved3) (void);
-  void (*_gtk_reserved4) (void);
-};
 
 /**
  * GtkIconLookupFlags: